<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
</head>
<style>
.red{
  background: red;
  color: #eee;
}
</style>
<body>
<script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>

<div id="app">
  <label >修改颜色</label><input type="checkbox" v-model="class1" >
  <br><br>
  <div v-bind:class="{'red': class1}">
  </div>
</div>
	
<script>
new Vue({
	el: '#app',
  data:{
  	class1: false
  }
});
</script>
</body>
</html>